import { defineStore } from 'pinia';

const useMenuStore = defineStore('menu', {
    state: () => ({
        selectedMenuItem: [], // header选中的菜单项 key 数组
        selectedKeys:["/"], // 当前选中的菜单项 key 数组
        openKeys:["/"] // 当前展开的 SubMenu 菜单项 key 数组
    }),
    persist: {
        enabled: true,
        strategies: [
            { key: 'menu', storage: localStorage },
        ],
    },
});

export default useMenuStore;